<CFMODULE TEMPLATE="#client.common_path#cfm_wswindow.cfm" TITLE="Schedule Assigning in Date Range">
	<CFSET sFolder="daterange">
	<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
		<CFOUTPUT>
			
			<TR>
				<TD colspan=4>
				   <CFIF isEnabled>
					<INPUT TYPE="SUBMIT" NAME="btnApplyChanges" VALUE = "Apply Changes" CLASS="bitbtn" ONCLICK="return verifydelete('Apply changes to selected employees:','Please select an employee to update.','')">&nbsp;
					<INPUT CLASS="bitbtn" TYPE="submit" NAME="btnResetAction" VALUE="Reset Data" ONCLICK="return verifydelete('Reset data of the selected employees:','Please select an employee to reset.','')">&nbsp;
				   </CFIF>
				</TD>
			</TR>
			<TR>
				<TD colspan=4>&nbsp;
				   
				</TD>
			</TR>
		</CFOUTPUT>
		<TR>
			<TD COLSPAN="4">
				<TABLE BORDER="0" WIDTH="100%">
					<CFOUTPUT>
						<TR ALIGN="CENTER" BGCOLOR="#client.color_tblhead#">
							<TD WIDTH="15%" CLASS="boldwhite">Reference Date</TD>
							<TD WIDTH="25%" CLASS="boldwhite">Schedule Code</TD>
							<TD WIDTH="10%" CLASS="boldwhite">Day Type</TD>
							<TD WIDTH="10%" CLASS="boldwhite">Sked In</TD>
							<TD WIDTH="10%" CLASS="boldwhite">Sked Out</TD>
							<TD WIDTH="10%" CLASS="boldwhite">Category</TD>
							<TD CLASS="boldwhite">Sked Type</TD>
						</TR>
					</CFOUTPUT>
				</TABLE>
			</TD>
		</TR>
	&nbsp;
		<TR>
			<TD COLSPAN="4">
				<TABLE BORDER="0" WIDTH="100%">
					<CFSET rowCounter=0>
					<CFIF sDateFrom NEQ "" AND sDateTo NEQ "">
						<CFSET sTo=dateformat(sDateTo,"mm/dd/yyyy")>
						<CFSET sFrom=dateformat(sDateFrom,"mm/dd/yyyy")>
						<CFOUTPUT>
							<CFLOOP CONDITION="#sFrom# LTE  #sTo#">
								<CFSET rowCounter=rowCounter+1>
								<!--- Put code and desc in front column --->
								<CFSET lstKeyValue="DAYTYPE,TIMEIN,TIMEOUT,CATEGORY">
								<CFSET sLkFlds="Pattern Code~PATTERNCODE~ftString,Day Type~DAYTYPE~ftString,Sked In~TIMEIN~ftString,Sked Out~TIMEOUT~ftString,Category~CATEGORY~ftString">
								
								<CFSET sfrmflddesc="PATTERNCODElkDAYTYPE#rowCounter#,PATTERNCODElkTIMEIN#rowCounter#,PATTERNCODElkTIMEOUT#rowCounter#,PATTERNCODElkCATEGORY#rowCounter#">
								<CFSET sflddesc=lstKeyValue>
								<CFSET sFolder="daterange">
								<CFINCLUDE TEMPLATE="../common/getsched.cfm">	
								<TR ALIGN="CENTER" BGCOLOR="#IIf(rowCounter Mod 2, "client.color_tblset1", "client.color_tblset2")#" >
									<TD nowrap WIDTH="15%" ALIGN="CENTER">
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="8" NAME="fldRefDate#rowCounter#" VALUE="#DATEFORMAT(sFrom,"mm/dd/yyyy")#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>Current Sked:</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap WIDTH="25%" >
										&nbsp;<INPUT TYPE="TEXT" SIZE="20" NAME="edtSchedCode#rowCounter#" ID="idSchedCode#rowCounter#" VALUE="#varPoolCODE#" ONBLUR=""GetValue('C','CLKWSPATTERN','edtSchedCode#rowCounter#,lkPATTERNCODE#rowCounter#','frmSched','#sLkFlds#','PATTERNCODE','lkPATTERNCODE#rowCounter#','PATTERNCODE',this.value)  Readonly #sCanUpdate# > 
                               
											<CFIF isEnabled><A HREF="javascript:ShowLookup('C','CLKWSPATTERN','edtSchedCode#rowCounter#,lkPATTERNCODE#rowCounter#','frmSched','#sLkFlds#','PATTERNCODE','#sfrmflddesc#','#sflddesc#','','')"></CFIF><IMG SRC="#client.icon_path#lookup.gif" BORDER="0" ALT="Select from Lookup" ALIGN="bottom" ><CFIF isEnabled></A></CFIF>	
											<INPUT TYPE="hidden" NAME="lkPATTERNCODE#rowCounter#" VALUE="">
											<CFIF varPATTERNCODE NEQ ""><br><i>#varPATTERNCODE#</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap WIDTH="10%" >
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="6" NAME="PATTERNCODElkDAYTYPE#rowCounter#" VALUE="#sDAYTYPEPool#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>#sDAYTYPE#</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap WIDTH="10%" >
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="6" NAME="PATTERNCODElkTIMEIN#rowCounter#" VALUE="#getpoolDTL.TIMEIN#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>#getlkDTL.TIMEIN#</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap WIDTH="10%" >
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="6" NAME="PATTERNCODElkTIMEOUT#rowCounter#" VALUE="#getpoolDTL.TIMEOUT#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>#getlkDTL.TIMEOUT#</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap WIDTH="10%">
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="6" NAME="PATTERNCODElkCATEGORY#rowCounter#" VALUE="#getpoolDTL.CATEGORY#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>#getlkDTL.CATEGORY#</i>&nbsp;</CFIF>
									</TD>
									<TD nowrap>
										&nbsp;<INPUT STYLE="background-color:##d4d0c8;" TYPE="TEXT" BORDER="0" SIZE="15" NAME="schedType#rowCounter#" VALUE="#varPoolType#" Readonly>
										<CFIF varPATTERNCODE NEQ ""><br><i>#varSchedType#</i>&nbsp;</CFIF>
									</TD>
								</TR>
								<CFSET sFrom=dateformat(dateadd("d",1,sFrom),"mm/dd/yyyy")>
							</CFLOOP>
						</CFOUTPUT>
					<CFELSE>
						<TR>
							<TD COLSPAN=7 align="center"><b>No Records Found</b></TD>
						</TR>
					</CFIF>
					<CFOUTPUT>
						<TR BGCOLOR="#client.color_tblfoot#">
							<TD COLSPAN=7 CLASS="boldwhite" HEIGHT=18>&nbsp;#rowCounter# records found.</TD>
						</TR>
						<INPUT TYPE="hidden" NAME="fldRowCount" VALUE="#rowCounter#">
					</CFOUTPUT>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
<CFMODULE TEMPLATE="#client.common_path#cfm_wswindow.cfm" TOP="False">
